package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2017/1/11.
 */

public class UserMessageDetailAction extends AHttpService<PbBean.PbResUserGetMessageDetail>{

    public static UserMessageDetailAction newInstance(Context context, int messageId){
        return new UserMessageDetailAction(context, messageId);
    }

    private int messageId;
    private UserMessageDetailAction(Context context, int messageId) {
        super(context);
        this.messageId = messageId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserGetMessageDetail.Builder builder = PbBean.PbReqUserGetMessageDetail.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setMessageId(messageId);

        return apiService.getMessageDetail(builder.build());
    }
}
